﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;

namespace POS
{
    class CustomerCatalog
    {
        ArrayList descriptions = new ArrayList();

        public CustomerCatalog() {
            // Eksempeldata
            CustomerDescription desc = new CustomerDescription(1, "Jakob", 10);
            descriptions.Add(desc);
            desc = new CustomerDescription(2, "Michael", 20);
            descriptions.Add(desc);
            desc = new CustomerDescription(3, "Ole", 30);
            descriptions.Add(desc);
        }

        public CustomerDescription getCustomerDescription(int kundeNummer)
        {
            foreach (CustomerDescription customer in descriptions)
            {
                if (customer.getKundeNummer() == kundeNummer)
                {
                    return customer;
                }
            }
            return null;
        }
    }
}
